﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/MasterPage.Master" AutoEventWireup="true"
    CodeBehind="List.aspx.cs" Inherits="Token.Piker.Web.Admin.Slide.List" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>首页大图管理</title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <p style = "padding-right:20px;text-align:right;">
        <a href="Add.aspx">添加</a></p>
    <asp:GridView ID="gridView" runat="server" AllowPaging="True" Width="98%" CellPadding="3"
        BorderWidth="1px" AutoGenerateColumns="false" PageSize="8" DataKeyNames = "Id"
        onrowcommand="gridView_RowCommand" HeaderStyle-Font-Bold = "true"
        onrowdatabound="gridView_RowDataBound"
        onrowdeleting="gridView_RowDeleting">
        <Columns>
            <asp:HyperLinkField HeaderText ="首页图" Target ="_blank" DataNavigateUrlFields ="SRC" Text ="点击查看" />
            <asp:HyperLinkField DataTextField = "URL" HeaderText = "网址" DataNavigateUrlFields = "URL" />
            <asp:BoundField DataField="RealName" HeaderText="操作人" />
            <asp:BoundField DataField="AddTime" HeaderText="时间"  />
            <asp:TemplateField HeaderText="状态">
                <ItemTemplate>
                    <asp:LinkButton ID="lkbChangeState" runat="server" Text='<%# Eval("SlideState") %>'
                        OnClick="ChangeState" OnClientClick="return confirm('确定更改？')" CommandArgument = '<%# Eval("Id") %>'></asp:LinkButton>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="彻底删除">
                <ItemTemplate>
                    <asp:LinkButton ID="lkbDelete" runat="server" CommandName="Delete" CommandArgument = '<%# Eval("SRC") %>'
                        OnClientClick="return confirm('确定彻底删除？')" Text="彻底删除"></asp:LinkButton>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
    <p>
    <webdiyer:AspNetPager ID="pagerList" runat="server" Width="95%" NumericButtonCount="6"
        UrlPaging="true" NumericButtonTextFormatString="[{0}]" CustomInfoHTML=" 第 <font color='red'><b>%CurrentPageIndex%</b></font> 页 共 %PageCount% 页 显示 %StartRecordIndex%-%EndRecordIndex% 条"
        ShowCustomInfoSection="left" FirstPageText="首页" LastPageText="末页" NextPageText="下页"
        PrevPageText="上页" Font-Names="Arial" BackColor="#F8B500" AlwaysShow="true" ShowInputBox="Always"
        SubmitButtonText="跳转" OnPageChanged="pagerList_PageChanged" PageSize="8" ReverseUrlPageIndex="True">
    </webdiyer:AspNetPager>
    </p>
</asp:Content>
